/*
 * main.cpp
 *
 *  Created on: Mar 21, 2012
 *      Author: s146913
 */

#include "Auto.h"
#include "Agent.h"
#include "BigBrother.h"
#include <iostream>

using namespace std;

int main() {
	BigBrother* bb = new BigBrother();

	cout << "Auto's Richting NOORD aanmelden" << endl;
	for (int i =0; i<12; i++){
		Auto* au = new Auto(NOORD, "auto_noord");

		//Meld aan en start thread
		bb->meldAan(au);
	}

	cout << "Auto's Richting OOST aanmelden" << endl;
	for (int i =0; i<8; i++){
		Auto* au = new Auto(OOST, "auto_oost");
		//Meld aan en start thread
		bb->meldAan(au);
	}

	cout << "Auto's Richting ZUID aanmelden" << endl;
	for (int i =0; i<4; i++){
		Auto* au = new Auto(ZUID, "auto_zuid");
		//Meld aan en start thread
		bb->meldAan(au);
	}

	cout << "Auto's Richting WEST aanmelden" << endl;
	for (int i =0; i<3; i++){
		Auto* au = new Auto(WEST, "auto_west");
		//Meld aan en start thread
		bb->meldAan(au);
	}

	Agent* agent = new Agent("agent", bb);
	cout << "construct of street finished." << endl;

	//Start agentthread
	agent->start();
	cout << "Agent started his shift." << endl;

	while (true) {
	}
	return 0;
}
